home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 12841 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: yoyo.cc.monash.edu.au!not-for-mail
  2. From: bcheung@yoyo.cc.monash.edu.au (Biggles Cheung)
  3. Newsgroups: comp.lang.c
  4. Subject: Does C convert float to double internally ?
  5. Date: 3 Apr 1996 01:52:49 GMT
  6. Organization: Monash University
  7. Message-ID: <4jsllh$hkf@harbinger.cc.monash.edu.au>
  8. NNTP-Posting-Host: yoyo.cc.monash.edu.au
  9. X-NNTP-Posting-User: bcheung
  10. X-Newsreader: TIN [UNIX 1.3 950823BETA PL0]
  11.  
  12. I was told that C compiler automatically converts "float" variable
  13. internally to "double" for + - * / , etc operations. Is this true?
  14.  
  15. Can I force the C compiler not to do the conversion as I have an
  16. assignment on finding out various computing errors of different
  17. precisions? 
  18.  
  19. My advice from the lecturer is to have temporary variable of
  20. float to split a long equation to smaller step so that I can maximize
  21. the impact of single precision number on the evaluation. Is this
  22. feasible?
  23.  
  24.  
  25.  
  26.  
  27. _/\/\/\/\/\___/\/\_________________________/\/\_________________________
  28. _/\/\____/\/\__________/\/\/\/\___/\/\/\/\_/\/\_____/\/\/\_____/\/\/\/\_
  29. _/\/\/\/\/\___/\/\___/\/\__/\/\_/\/\__/\/\_/\/\___/\/\/\/\/\_/\/\/\/\___
  30. _/\/\____/\/\_/\/\_____/\/\/\/\___/\/\/\/\_/\/\___/\/\_____________/\/\_
  31. _/\/\/\/\/\___/\/\/\_______/\/\_______/\/\_/\/\/\___/\/\/\/\_/\/\/\/\___
  32. ____________________/\/\/\/\___/\/\/\/\_________________________________
  33.  
  34.     / biggles@c031.aone.net.au    \    
  35.     \ bcheung@yoyo.cc.monash.edu.au    / ~~ Biggles CHEUNG
  36.  
  37.  
  38.  
  39.